package com.mrper.analysis

import android.app.Application
import android.view.animation.AnimationUtils
import android.widget.TextView
import com.sph.ga.tool.asm.ViewClickHandler

class TestApplication : Application() {

    override fun onCreate() {
        super.onCreate()
        ViewClickHandler.setOnClickHandleListener { view ->
            println("=====> 接收到了单击事件\n" +
                "activity=${view.context}\n" +
                "class=${view.javaClass}\n" +
                "viewParent=${(view.parent)?.javaClass?.simpleName}\n" +
                "text=${(view as? TextView)?.text}\n\n")
            view.startAnimation(AnimationUtils.loadAnimation(view.context, R.anim.shake))
        }
    }

}